package com.nmf.dao.gen;

import com.nmf.dao.gen.bean.BizSysRoleOfficeExample;
import com.nmf.dao.gen.bean.BizSysRoleOfficeKey;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface BizSysRoleOfficeMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sys_role_office
     */
    @SelectProvider(type=BizSysRoleOfficeSqlProvider.class, method="countByExample")
    long countByExample(BizSysRoleOfficeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sys_role_office
     */
    @DeleteProvider(type=BizSysRoleOfficeSqlProvider.class, method="deleteByExample")
    int deleteByExample(BizSysRoleOfficeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sys_role_office
     */
    @Delete({
        "delete from sys_role_office",
        "where role_id = #{roleId,jdbcType=VARCHAR}",
          "and office_id = #{officeId,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(BizSysRoleOfficeKey key);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sys_role_office
     */
    @Insert({
        "insert into sys_role_office (role_id, office_id)",
        "values (#{roleId,jdbcType=VARCHAR}, #{officeId,jdbcType=VARCHAR})"
    })
    int insert(BizSysRoleOfficeKey record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sys_role_office
     */
    @InsertProvider(type=BizSysRoleOfficeSqlProvider.class, method="insertSelective")
    int insertSelective(BizSysRoleOfficeKey record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sys_role_office
     */
    @SelectProvider(type=BizSysRoleOfficeSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="role_id", property="roleId", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="office_id", property="officeId", jdbcType=JdbcType.VARCHAR, id=true)
    })
    List<BizSysRoleOfficeKey> selectByExample(BizSysRoleOfficeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sys_role_office
     */
    @UpdateProvider(type=BizSysRoleOfficeSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") BizSysRoleOfficeKey record, @Param("example") BizSysRoleOfficeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sys_role_office
     */
    @UpdateProvider(type=BizSysRoleOfficeSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") BizSysRoleOfficeKey record, @Param("example") BizSysRoleOfficeExample example);
}